// +build ignore

package main

import (
	"fmt"
	"os"
	"time"

	"gopl/goroutine/thumbnail"
)

func makeThumbnails(filenames []string) {
	for _, f := range filenames {
		go thumbnail.ImageFile(f)
	}
}

func elapse() func() {
	now := time.Now()
	return func() {
		fmt.Printf("elapse:%.3f ms\n", 1000*time.Since(now).Seconds())
	}
}

func main() {
	defer elapse()()
	makeThumbnails(os.Args[1:])
}
